
package com.timber.util;

import pv.jfcx.*;


public class UtilColumnManager extends SLColumnManager
{
  /**
   **  All the columns known to the inventory application
   **/
  public static final int	SEID		=  1;
  public static final int	RICCODE		=  2;
  public static final int	TICKER		=  3;
  public static final int	CUSIP		=  4;
  public static final int	ISIN		=  5;
  public static final int	SEDOL		=  6;
  public static final int	QUICK		=  7;
  public static final int	WPK		=  8;
  public static final int	SYMBOL		=  9;
  public static final int	STOCKNAME	= 10;
  public static final int	PRIMARYEXCHANGE	= 11;
  public static final int	COUNTRYCODE	= 12;
  public static final int	CURRENCY	= 13;
  public static final int	EXCHANGE        = 14;


  /**
   **  Singleton instance
   **/
  private static UtilColumnManager	ucm = null;

  /**
   **  Returns the singleton instance - creating it if this is the
   **  first call.
   **/
  public static UtilColumnManager getInstance()
  {
    if( ucm == null )
      ucm = new UtilColumnManager();

    return ucm;
  }

  /**
   **  Private constructor - callers get the singleton instance thru
   **  the getInstance() call.
   **/
  private UtilColumnManager()
  {
    //
    //  Populate our hash tables
    //

    //   ID               IdName              Display Label        Column Type         Width
    //   ---------------- ------------------  -------------------- ------------------- -----
    put( SEID,            "SeId",             "Internal\nID",      JPVTable.TEXT,   11 );
    put( RICCODE,         "RicCode",          "Ric",               JPVTable.TEXT_NULL, 16 );
    put( TICKER,          "BbTicker",         "Ticker",            JPVTable.TEXT_NULL, 10 );
    put( CUSIP,           "Cusip",            "CUSIP",             JPVTable.TEXT_NULL,  9 );
    put( ISIN,            "Isin",             "ISIN",              JPVTable.TEXT_NULL, 12 );
    put( SEDOL,           "Sedol",            "SEDOL",             JPVTable.TEXT_NULL,  7 );
    put( QUICK,           "Quick",            "QUICK",             JPVTable.TEXT_NULL,  5 );
    put( WPK,             "WPK",              "WPK",               JPVTable.TEXT_NULL, 10 );
    put( SYMBOL,          "Symbol",           "Symbol",            JPVTable.TEXT_NULL, 10 );
    put( STOCKNAME,       "Description",      "Description",       JPVTable.TEXT_NULL, 20 );
    put( PRIMARYEXCHANGE, "PrimaryExchange",  "Primary\nExchange", JPVTable.TEXT_NULL,  8 );
    put( COUNTRYCODE,     "CountryCode",      "Cntry",             JPVTable.TEXT_NULL,  5 );
    put( CURRENCY,        "Currency",         "CCY",               JPVTable.TEXT_NULL,  3 );
    put( EXCHANGE,        "Exchange",         "Exchange",          JPVTable.TEXT_NULL,  3 );
  }
}
